/**
 * Created by Dalyn on 2017/05-23.
 */
import Relay from "react-relay";

export default class enBalanceDetailMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { enBalanceDetail }`;
    }

    getVariables() {
        return {
            argsInput: {
                orderId: this.props.orderId,
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on enBalanceDetailPayload {
            data {
                errorCode
                value
                totalResult
                id 
                enterpriseBalance{
                    invoiceNum
                    expressName
                    expressSheet
                    invoiceFileJson
                    balanceMoney
                    repayMoney
                    remitFileJson
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on enBalanceDetailPayload {
                    data {
                        errorCode
                        value
                        totalResult
                        id 
                        enterpriseBalance{
                            invoiceNum
                            expressName
                            expressSheet
                            invoiceFileJson
                            balanceMoney
                            repayMoney
                            remitFileJson
                        }
                    }
                }
            `]
        }];
    }

}
